
public class SelectionSort {

	
	public static void main(String[] args) {
		int[] arr = {4,2,6,1,7,3,5,9,2};
		int temp;
		int min = 1000000;
		
		
		
		
		
		
		
		
		for (int i = 3; i <= 6; i++) {
			min = arr[i];
			for (int j = i; j <= 6; j++) {
				if(arr[j] < min){
					temp = min;
					min=arr[j];
					arr[j]=temp;
					arr[i]=min;
				}
			}
		}
		for (int i = 0; i < arr.length; i++) {
			System.out.print(arr[i]+" ");
		}

	}

}
